update settings, should now no longer be lost#485
Merged
Hirogen merged 7 commits intoDevelopmentfrom Nov 4, 2025
Merged
Conversation
added old xml persister, so if the new json one fails, it tries the old one new files are still saved in the json format, but old ones are converted
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements settings loss prevention features for LogExpert, including import validation, atomic file writes with backup, deserialization recovery, and comprehensive unit tests. The changes add robustness to configuration management by detecting empty/corrupt settings, implementing backup recovery mechanisms, and providing better error handling.
Key Changes
- Import validation with user confirmation for empty/default settings
- Atomic file write operations with automatic backup creation and recovery
- Comprehensive unit test suite covering import validation, atomic writes, and deserialization recovery
- Enum renaming from
DragOrientationsEnumtoDragOrientationsfor consistency - XML persistence fallback support for legacy project files
Reviewed Changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 25 comments.
Show a summary per file
| File | Description |
|---|---|
| Program.cs | Updated to handle ImportResult return value from config import |
| ConfigManager.cs | Major refactoring with import validation, atomic writes, backup recovery, and settings validation |
| SettingsDialog.cs | Updated to handle ImportResult with user confirmation flow and code style improvements |
| ConfigManagerTest.cs | New comprehensive test suite covering all 4 priority 1 implementations |
| ImportResult.cs | New result type for import operations with success/error/confirmation states |
| LoadResult.cs | New result type for load operations with backup recovery information |
| DragOrientations.cs | Renamed enum from DragOrientationsEnum for consistency |
| DateTimeDragControl.cs | Updated to use renamed enum |
| LogTabWindow.designer.cs | Updated to use renamed enum |
| Preferences.cs | Updated to use renamed enum |
| ProjectPersister.cs | Added XML fallback support for legacy project files |
| ProjectPersisterXML.cs | New XML persistence implementation for legacy project support |
| PersisterXML.cs | New XML persistence implementation for legacy persistence data |
| Persister.cs | Added XML fallback support with JsonReaderException handling |
| .editorconfig | Updated code style rules and formatting preferences |
| README.md | Improved markdown formatting and structure |
| LogExpert.Core.csproj | Added RootNamespace property |
| IConfigManager.cs | Updated Import method signature to return ImportResult |
Files not reviewed (1)
- src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.designer.cs: Language not supported
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…om/LogExperts/LogExpert into 480-importing-settings-doesnt-work # Conflicts: # src/LogExpert.Core/Config/LoadResult.cs
Contributor
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 26 out of 27 changed files in this pull request and generated 9 comments.
Files not reviewed (1)
- src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.designer.cs: Language not supported
Comments suppressed due to low confidence (1)
src/LogExpert.Core/Classes/Attributes/JsonColumnizerPropertyAttribute.cs:7
- Adding the
sealedmodifier to an existing attribute class could be a breaking change if external code has derived from this attribute. Verify that no external or internal code extends this attribute before making it sealed.
This was referenced Nov 4, 2025
This was
linked to
issues
Nov 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this should also fix the following issues: